home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / GXEnvironment.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  8.2 KB  |  380 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        GXEnvironment.a
  3. ;
  4. ;    Contains:    QuickDraw GX environment constants and interfaces
  5. ;
  6. ;    Version:    Technology:    Quickdraw GX 1.1
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__GXENVIRONMENT__') = 'UNDEFINED' THEN
  21. __GXENVIRONMENT__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  25.     include 'ConditionalMacros.a'
  26.     ENDIF
  27.  
  28.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  29.     include 'MixedMode.a'
  30.     ENDIF
  31. ;        include 'Types.a'                                            ;
  32.  
  33.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  34.     include 'Windows.a'
  35.     ENDIF
  36. ;        include 'Memory.a'                                            ;
  37. ;        include 'Quickdraw.a'                                        ;
  38. ;            include 'QuickdrawText.a'                                ;
  39. ;        include 'Events.a'                                            ;
  40. ;            include 'OSUtils.a'                                    ;
  41. ;        include 'Controls.a'                                        ;
  42. ;            include 'Menus.a'                                        ;
  43.  
  44.     IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
  45.     include 'GXTypes.a'
  46.     ENDIF
  47. ;        include 'GXMath.a'                                            ;
  48. ;            include 'FixMath.a'                                    ;
  49.  
  50.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  51.     include 'CMApplication.a'
  52.     ENDIF
  53. ;        include 'Files.a'                                            ;
  54. ;            include 'Finder.a'                                        ;
  55. ;        include 'Printing.a'                                        ;
  56. ;            include 'Errors.a'                                        ;
  57. ;            include 'Dialogs.a'                                    ;
  58. ;                include 'TextEdit.a'                                ;
  59. ;        include 'CMICCProfile.a'                                    ;
  60.     graphicsMacintoshIncludes: SET 1
  61.  
  62. defaultPollingHandlerFlags        EQU        $00
  63. okToSwitchDuringPollFlag        EQU        $00
  64. dontSwitchDuringPollFlag        EQU        $01
  65.  
  66. ; typedef long                 gxPollingHandlerFlags
  67. ;
  68. ; gxPollingHandlerUPP GXGetGraphicsPollingHandler(long *reference)
  69. ;
  70.     IF ¬ GENERATINGCFM THEN
  71.         Macro
  72.         _GXGetGraphicsPollingHandler
  73.             move.w    #$245,d0
  74.             dc.w     $A832
  75.         EndM
  76.     ELSE
  77.         IMPORT_CFM_FUNCTION    GXGetGraphicsPollingHandler
  78.     ENDIF
  79.  
  80. ;
  81. ; void GXSetGraphicsPollingHandler(gxPollingHandlerUPP handler, long reference)
  82. ;
  83.     IF ¬ GENERATINGCFM THEN
  84.         Macro
  85.         _GXSetGraphicsPollingHandler
  86.             move.w    #$246,d0
  87.             dc.w     $A832
  88.         EndM
  89.     ELSE
  90.         IMPORT_CFM_FUNCTION    GXSetGraphicsPollingHandler
  91.     ENDIF
  92.  
  93.     graphicsToolboxIncludes: SET 1
  94. ; QD to QD GX Translator typedefs 
  95.  
  96. gxDefaultOptionsTranslation        EQU        $0000
  97. gxOptimizedTranslation            EQU        $0001
  98. gxReplaceLineWidthTranslation    EQU        $0002
  99. gxSimpleScalingTranslation        EQU        $0004
  100. gxSimpleGeometryTranslation        EQU        $0008                ; implies simple scaling 
  101. gxSimpleLinesTranslation        EQU        $000C                ; implies simple geometry & scaling 
  102. gxLayoutTextTranslation            EQU        $0010                ; turn on gxLine layout (normally off) 
  103. gxRasterTargetTranslation        EQU        $0020
  104. gxPostScriptTargetTranslation    EQU        $0040
  105. gxVectorTargetTranslation        EQU        $0080
  106.  
  107. ; typedef long                 gxTranslationOption
  108.  
  109. gxContainsFormsBegin            EQU        $0001
  110. gxContainsFormsEnd                EQU        $0002
  111. gxContainsPostScript            EQU        $0004
  112. gxContainsEmptyPostScript        EQU        $0008
  113.  
  114. ; typedef long                 gxTranslationStatistic
  115.  
  116. gxQuickDrawPictTag                EQU        'pict'
  117.  
  118. gxQuickDrawPict         RECORD    0
  119. ; translator inputs 
  120. options                     ds.l   1        ; offset: $0 (0)
  121. srcRect                     ds     Rect    ; offset: $4 (4)
  122. styleStretch             ds     Point    ; offset: $C (12)
  123. ; size of quickdraw picture data 
  124. dataLength                 ds.l   1        ; offset: $10 (16)
  125. ; file alias 
  126. alias                     ds     gxBitmapDataSourceAlias ; offset: $14 (20)
  127. sizeof                     EQU *            ; size:   $1E (30)
  128.                         ENDR
  129.  
  130. ; typedef struct gxQuickDrawPict  gxQuickDrawPict
  131. ; WindowRecord utilities 
  132. ;
  133. ; gxViewPort GXNewWindowViewPort(WindowPtr qdWindow)
  134. ;
  135.     IF ¬ GENERATINGCFM THEN
  136.         Macro
  137.         _GXNewWindowViewPort
  138.             move.w    #$236,d0
  139.             dc.w     $A832
  140.         EndM
  141.     ELSE
  142.         IMPORT_CFM_FUNCTION    GXNewWindowViewPort
  143.     ENDIF
  144.  
  145. ;
  146. ; gxViewPort GXGetWindowViewPort(WindowPtr qdWindow)
  147. ;
  148.     IF ¬ GENERATINGCFM THEN
  149.         Macro
  150.         _GXGetWindowViewPort
  151.             move.w    #$237,d0
  152.             dc.w     $A832
  153.         EndM
  154.     ELSE
  155.         IMPORT_CFM_FUNCTION    GXGetWindowViewPort
  156.     ENDIF
  157.  
  158. ;
  159. ; WindowPtr GXGetViewPortWindow(gxViewPort portOrder)
  160. ;
  161.     IF ¬ GENERATINGCFM THEN
  162.         Macro
  163.         _GXGetViewPortWindow
  164.             move.w    #$238,d0
  165.             dc.w     $A832
  166.         EndM
  167.     ELSE
  168.         IMPORT_CFM_FUNCTION    GXGetViewPortWindow
  169.     ENDIF
  170.  
  171. ; GDevice utilities 
  172. ;
  173. ; GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
  174. ;
  175.     IF ¬ GENERATINGCFM THEN
  176.         Macro
  177.         _GXGetViewDeviceGDevice
  178.             move.w    #$239,d0
  179.             dc.w     $A832
  180.         EndM
  181.     ELSE
  182.         IMPORT_CFM_FUNCTION    GXGetViewDeviceGDevice
  183.     ENDIF
  184.  
  185. ;
  186. ; gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
  187. ;
  188.     IF ¬ GENERATINGCFM THEN
  189.         Macro
  190.         _GXGetGDeviceViewDevice
  191.             move.w    #$23a,d0
  192.             dc.w     $A832
  193.         EndM
  194.     ELSE
  195.         IMPORT_CFM_FUNCTION    GXGetGDeviceViewDevice
  196.     ENDIF
  197.  
  198. ; gxPoint utilities 
  199. ;
  200. ; void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
  201. ;
  202.     IF ¬ GENERATINGCFM THEN
  203.         Macro
  204.         _GXConvertQDPoint
  205.             move.w    #$23b,d0
  206.             dc.w     $A832
  207.         EndM
  208.     ELSE
  209.         IMPORT_CFM_FUNCTION    GXConvertQDPoint
  210.     ENDIF
  211.  
  212. ; printing utilities typedef 
  213. ; typedef gxShapeSpoolProcPtr  gxShapeSpoolFunction
  214. ; typedef gxUserViewPortFilterProcPtr  gxUserViewPortFilter
  215. ; typedef gxConvertQDFontProcPtr  gxConvertQDFontFunction
  216. ; mouse utilities 
  217. ; return mouse location in fixed-gxPoint global space 
  218. ;
  219. ; void GXGetGlobalMouse(gxPoint *globalPt)
  220. ;
  221.     IF ¬ GENERATINGCFM THEN
  222.         Macro
  223.         _GXGetGlobalMouse
  224.             move.w    #$23c,d0
  225.             dc.w     $A832
  226.         EndM
  227.     ELSE
  228.         IMPORT_CFM_FUNCTION    GXGetGlobalMouse
  229.     ENDIF
  230.  
  231. ; return fixed-gxPoint local mouse (gxViewPort == 0 --> default) 
  232. ;
  233. ; void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
  234. ;
  235.     IF ¬ GENERATINGCFM THEN
  236.         Macro
  237.         _GXGetViewPortMouse
  238.             move.w    #$23d,d0
  239.             dc.w     $A832
  240.         EndM
  241.     ELSE
  242.         IMPORT_CFM_FUNCTION    GXGetViewPortMouse
  243.     ENDIF
  244.  
  245. ; printing utilities 
  246. ;
  247. ; gxUserViewPortFilter GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
  248. ;
  249.     IF ¬ GENERATINGCFM THEN
  250.         Macro
  251.         _GXGetViewPortFilter
  252.             move.w    #$25e,d0
  253.             dc.w     $A832
  254.         EndM
  255.     ELSE
  256.         IMPORT_CFM_FUNCTION    GXGetViewPortFilter
  257.     ENDIF
  258.  
  259. ;
  260. ; void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilter filter, long refCon)
  261. ;
  262.     IF ¬ GENERATINGCFM THEN
  263.         Macro
  264.         _GXSetViewPortFilter
  265.             move.w    #$23e,d0
  266.             dc.w     $A832
  267.         EndM
  268.     ELSE
  269.         IMPORT_CFM_FUNCTION    GXSetViewPortFilter
  270.     ENDIF
  271.  
  272. ; QD to QD GX Translator functions 
  273. ;
  274. ; void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolUPP userFunction, void *reference)
  275. ;
  276.     IF ¬ GENERATINGCFM THEN
  277.         Macro
  278.         _GXInstallQDTranslator
  279.             move.w    #$23f,d0
  280.             dc.w     $A832
  281.         EndM
  282.     ELSE
  283.         IMPORT_CFM_FUNCTION    GXInstallQDTranslator
  284.     ENDIF
  285.  
  286. ;
  287. ; gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
  288. ;
  289.     IF ¬ GENERATINGCFM THEN
  290.         Macro
  291.         _GXRemoveQDTranslator
  292.             move.w    #$240,d0
  293.             dc.w     $A832
  294.         EndM
  295.     ELSE
  296.         IMPORT_CFM_FUNCTION    GXRemoveQDTranslator
  297.     ENDIF
  298.  
  299. ;
  300. ; gxShape GXConvertPICTToShape(PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
  301. ;
  302.     IF ¬ GENERATINGCFM THEN
  303.         Macro
  304.         _GXConvertPICTToShape
  305.             move.w    #$241,d0
  306.             dc.w     $A832
  307.         EndM
  308.     ELSE
  309.         IMPORT_CFM_FUNCTION    GXConvertPICTToShape
  310.     ENDIF
  311.  
  312. ; Find the best GX style given a QD font and face. Called by the QD->GX translator 
  313. ;
  314. ; long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
  315. ;
  316.     IF ¬ GENERATINGCFM THEN
  317.         Macro
  318.         _GXConvertQDFont
  319.             move.w    #$242,d0
  320.             dc.w     $A832
  321.         EndM
  322.     ELSE
  323.         IMPORT_CFM_FUNCTION    GXConvertQDFont
  324.     ENDIF
  325.  
  326. ;
  327. ; gxConvertQDFontUPP GXGetConvertQDFont(void)
  328. ;
  329.     IF ¬ GENERATINGCFM THEN
  330.         Macro
  331.         _GXGetConvertQDFont
  332.             move.w    #$243,d0
  333.             dc.w     $A832
  334.         EndM
  335.     ELSE
  336.         IMPORT_CFM_FUNCTION    GXGetConvertQDFont
  337.     ENDIF
  338.  
  339. ;
  340. ; void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
  341. ;
  342.     IF ¬ GENERATINGCFM THEN
  343.         Macro
  344.         _GXSetConvertQDFont
  345.             move.w    #$244,d0
  346.             dc.w     $A832
  347.         EndM
  348.     ELSE
  349.         IMPORT_CFM_FUNCTION    GXSetConvertQDFont
  350.     ENDIF
  351.  
  352. ; ColorSync 2.0 interface related routines 
  353. ;
  354. ; void GXSetColorProfileReference(gxColorProfile profile, CMProfileRef reference)
  355. ;
  356.     IF ¬ GENERATINGCFM THEN
  357.         Macro
  358.         _GXSetColorProfileReference
  359.             move.w    #$282,d0
  360.             dc.w     $A832
  361.         EndM
  362.     ELSE
  363.         IMPORT_CFM_FUNCTION    GXSetColorProfileReference
  364.     ENDIF
  365.  
  366. ;
  367. ; CMProfileRef GXGetColorProfileReference(gxColorProfile profile)
  368. ;
  369.     IF ¬ GENERATINGCFM THEN
  370.         Macro
  371.         _GXGetColorProfileReference
  372.             move.w    #$283,d0
  373.             dc.w     $A832
  374.         EndM
  375.     ELSE
  376.         IMPORT_CFM_FUNCTION    GXGetColorProfileReference
  377.     ENDIF
  378.  
  379.     ENDIF ; __GXENVIRONMENT__
  380.